import { AnimationClip } from "cc";
import State from "../../base/State";
import { StateMachine } from "../../base/stateMachine";
import { SubStateMachine } from "../../base/subStateMachine";
import { DIRECTION_ORDER_ENUM, DIRECTION_UNUM, PARAMS_NAME_ENUM } from "../enums";

const BASE_URL = "texture/player/idle";

export default class IdleSubStateMachine extends SubStateMachine {
    constructor(_fsm: StateMachine) {
        super(_fsm);

        this._stateMachines.set(DIRECTION_UNUM.LEFT, new State(_fsm, `${BASE_URL}/left`, AnimationClip.WrapMode.Loop));
        this._stateMachines.set(DIRECTION_UNUM.RIGHT, new State(_fsm, `${BASE_URL}/right`, AnimationClip.WrapMode.Loop));
    }
};